//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.未分类;

public class demo_1491 {
    public demo_1491() {
    }

    public double average(int[] salary) {
        double sum = (double)0.0F;
        double max = (double)Integer.MIN_VALUE;
        double min = (double)Integer.MAX_VALUE;

        for(int j : salary) {
            if ((double)j > max) {
                max = (double)j;
            }

            if ((double)j < min) {
                min = (double)j;
            }

            sum += (double)j;
        }

        return (sum - max - min) / (double)(salary.length - 2);
    }
}
